package com.bw.aop;

import com.alibaba.fastjson.JSON;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class Myaop {
    // 前置通知
    @Before("execution(* com.bw.service.*.*(..))")
    public void  before(JoinPoint joinPoint){

        System.out.println("方法名 ：" +joinPoint.getSignature().getName());
        System.out.println("方法入参 ：" + JSON.toJSONString(joinPoint.getArgs()));


    }
}
